home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Tool Chest / Development Kits / MPW etc. / MPW-GM / Interfaces&Libraries / Interfaces / PInterfaces / DriverGestalt.p < prev    next >
Encoding:
Text File  |  1998-02-17  |  19.5 KB  |  481 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        DriverGestalt.p
  3.  
  4.      Contains:    Driver Gestalt interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT DriverGestalt;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRIVERGESTALT__}
  28. {$SETC __DRIVERGESTALT__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DriverGestaltIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OSUTILS__}
  38. {$I OSUtils.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __SCSI__}
  41. {$I SCSI.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. {__________________________________________________________________________________}
  50. { The Driver Gestalt bit in the dCtlFlags }
  51.  
  52. CONST
  53.     kbDriverGestaltEnable        = 2;
  54.     kmDriverGestaltEnableMask    = $04;
  55.  
  56. {__________________________________________________________________________________}
  57. { Driver Gestalt related csCodes }
  58.     kDriverGestaltCode            = 43;                            {  various uses  }
  59.     kDriverConfigureCode        = 43;                            {  various uses  }
  60.     kdgLowPowerMode                = 70;                            {  Sets/Returns the current energy consumption level  }
  61.     kdgReturnDeviceID            = 120;                            {  returns SCSI DevID in csParam[0]  }
  62.     kdgGetCDDeviceInfo            = 121;                            {  returns CDDeviceCharacteristics in csParam[0]  }
  63.  
  64. {__________________________________________________________________________________}
  65. { Driver Gestalt selectors }
  66.     kdgVersion                    = 'vers';                        {  Version number of the driver in standard Apple format  }
  67.     kdgDeviceType                = 'devt';                        {  The type of device the driver is driving.  }
  68.     kdgInterface                = 'intf';                        {  The underlying interface that the driver is using (if any)  }
  69.     kdgSync                        = 'sync';                        {  True if driver only behaves synchronously.  }
  70.     kdgBoot                        = 'boot';                        {  value to place in PRAM for this drive (long)  }
  71.     kdgWide                        = 'wide';                        {  True if driver supports ioWPosOffset  }
  72.     kdgPurge                    = 'purg';                        {  Driver purge permission (True = purge; False = no purge)  }
  73.     kdgSupportsSwitching        = 'lpwr';                        {  True if driver supports power switching  }
  74.     kdgMin3VPower                = 'pmn3';                        {  Minimum 3.3V power consumption in microWatts  }
  75.     kdgMin5VPower                = 'pmn5';                        {  Minimum 5V power consumption in microWatts  }
  76.     kdgMax3VPower                = 'pmx3';                        {  Maximum 3.3V power consumption in microWatts  }
  77.     kdgMax5VPower                = 'pmx5';                        {  Maximum 5V power consumption in microWatts  }
  78.     kdgInHighPower                = 'psta';                        {  True if device is currently in high power mode  }
  79.     kdgSupportsPowerCtl            = 'psup';                        {  True if driver supports following five calls  }
  80.     kdgAPI                        = 'dAPI';                        {  API support for PC Exchange  }
  81.     kdgEject                    = 'ejec';                        {  Eject options for shutdown/restart (Shutdown Mgr)  }
  82.     kdgFlush                    = 'flus';                        {  Determine if disk driver supports flush and if it needs a flush  }
  83.     kdgVMOptions                = 'vmop';                        {  Disk drive's Virtual Memory options  }
  84.     kdgMediaInfo                = 'minf';                        {  return media specific information  }
  85.  
  86. {__________________________________________________________________________________}
  87. { Driver Configure selectors }
  88.     kdcFlush                    = 'flus';                        {  Tell a disk driver to flush its cache and any hardware caches  }
  89.     kdcVMOptions                = 'vmop';                        {  Change the disk driver's Virtual Memory options  }
  90.  
  91. {__________________________________________________________________________________}
  92. { control parameter block for Driver Configure calls }
  93.  
  94. TYPE
  95.     DriverConfigParamPtr = ^DriverConfigParam;
  96.     DriverConfigParam = RECORD
  97.         qLink:                    QElemPtr;
  98.         qType:                    INTEGER;
  99.         ioTrap:                    INTEGER;
  100.         ioCmdAddr:                Ptr;
  101.         ioCompletion:            ProcPtr;
  102.         ioResult:                OSErr;
  103.         ioNamePtr:                StringPtr;
  104.         ioVRefNum:                INTEGER;
  105.         ioCRefNum:                INTEGER;                                {  refNum for I/O operation  }
  106.         csCode:                    INTEGER;                                {  == kDriverConfigureCode  }
  107.         driverConfigureSelector: OSType;
  108.         driverConfigureParameter: UInt32;
  109.     END;
  110.  
  111. {__________________________________________________________________________________}
  112. { status parameter block for Driver Gestalt calls }
  113.     DriverGestaltParamPtr = ^DriverGestaltParam;
  114.     DriverGestaltParam = RECORD
  115.         qLink:                    QElemPtr;
  116.         qType:                    INTEGER;
  117.         ioTrap:                    INTEGER;
  118.         ioCmdAddr:                Ptr;
  119.         ioCompletion:            ProcPtr;
  120.         ioResult:                OSErr;
  121.         ioNamePtr:                StringPtr;
  122.         ioVRefNum:                INTEGER;
  123.         ioCRefNum:                INTEGER;                                {  refNum for I/O operation  }
  124.         csCode:                    INTEGER;                                {     == kDriverGestaltCode  }
  125.         driverGestaltSelector:    OSType;                                    {  'sync', 'vers', etc.  }
  126.         driverGestaltResponse:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  127.         driverGestaltResponse1:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  128.         driverGestaltResponse2:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  129.         driverGestaltResponse3:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  130.         driverGestaltfiller:    UInt16;                                    {  To pad out to the size of a controlPB  }
  131.     END;
  132.  
  133. { Note that the various response definitions are overlays of the response fields above.
  134.    For instance the deviceType response would be returned in driverGestaltResponse.
  135.    The DriverGestaltPurgeResponse would be in driverGestaltResponse and driverGestaltResponse1
  136. }
  137. {__________________________________________________________________________________}
  138. { Device Types response }
  139.     DriverGestaltDevTResponsePtr = ^DriverGestaltDevTResponse;
  140.     DriverGestaltDevTResponse = RECORD
  141.         deviceType:                OSType;
  142.     END;
  143.  
  144.  
  145. CONST
  146.     kdgDiskType                    = 'disk';                        {  standard r/w disk drive  }
  147.     kdgTapeType                    = 'tape';                        {  tape drive  }
  148.     kdgPrinterType                = 'prnt';                        {  printer  }
  149.     kdgProcessorType            = 'proc';                        {  processor  }
  150.     kdgWormType                    = 'worm';                        {  write-once  }
  151.     kdgCDType                    = 'cdrm';                        {  cd-rom drive  }
  152.     kdgFloppyType                = 'flop';                        {  floppy disk drive  }
  153.     kdgScannerType                = 'scan';                        {  scanner  }
  154.     kdgFileType                    = 'file';                        {  Logical Partition type based on a file (Drive Container)  }
  155.     kdgRemovableType            = 'rdsk';                        {  A removable media hard disk drive ie. Syquest, Bernioulli  }
  156.  
  157. {__________________________________________________________________________________}
  158. { Device Interfaces response }
  159.  
  160. TYPE
  161.     DriverGestaltIntfResponsePtr = ^DriverGestaltIntfResponse;
  162.     DriverGestaltIntfResponse = RECORD
  163.         interfaceType:            OSType;
  164.     END;
  165.  
  166.  
  167. CONST
  168.     kdgScsiIntf                    = 'scsi';
  169.     kdgPcmciaIntf                = 'pcmc';
  170.     kdgATAIntf                    = 'ata ';
  171.     kdgFireWireIntf                = 'fire';
  172.     kdgExtBus                    = 'card';
  173.  
  174. {__________________________________________________________________________________}
  175. { Power Saving }
  176.  
  177. TYPE
  178.     DriverGestaltPowerResponsePtr = ^DriverGestaltPowerResponse;
  179.     DriverGestaltPowerResponse = RECORD
  180.         powerValue:                UInt32;                                    {  Power consumed in µWatts  }
  181.     END;
  182.  
  183. {__________________________________________________________________________________}
  184. { Disk Specific }
  185.     DriverGestaltSyncResponsePtr = ^DriverGestaltSyncResponse;
  186.     DriverGestaltSyncResponse = RECORD
  187.         behavesSynchronously:    BOOLEAN;
  188.         pad:                    PACKED ARRAY [0..2] OF UInt8;
  189.     END;
  190.  
  191.     DriverGestaltBootResponsePtr = ^DriverGestaltBootResponse;
  192.     DriverGestaltBootResponse = RECORD
  193.         extDev:                    SInt8;                                    {   Packed target (upper 5 bits) LUN (lower 3 bits)  }
  194.         partition:                SInt8;                                    {   Unused  }
  195.         SIMSlot:                SInt8;                                    {   Slot  }
  196.         SIMsRSRC:                SInt8;                                    {   sRsrcID  }
  197.     END;
  198.  
  199.     DriverGestaltAPIResponsePtr = ^DriverGestaltAPIResponse;
  200.     DriverGestaltAPIResponse = RECORD
  201.         partitionCmds:            INTEGER;                                {  if bit 0 is nonzero, supports partition control and status calls  }
  202.                                                                         {          prohibitMounting (control, kProhibitMounting)  }
  203.                                                                         {          partitionToVRef (status, kGetPartitionStatus)  }
  204.                                                                         {          getPartitionInfo (status, kGetPartInfo)  }
  205.         unused1:                INTEGER;                                {  all the unused fields should be zero  }
  206.         unused2:                INTEGER;
  207.         unused3:                INTEGER;
  208.         unused4:                INTEGER;
  209.         unused5:                INTEGER;
  210.         unused6:                INTEGER;
  211.         unused7:                INTEGER;
  212.         unused8:                INTEGER;
  213.         unused9:                INTEGER;
  214.         unused10:                INTEGER;
  215.     END;
  216.  
  217.     DriverGestaltFlushResponsePtr = ^DriverGestaltFlushResponse;
  218.     DriverGestaltFlushResponse = RECORD
  219.         canFlush:                BOOLEAN;                                {  Return true if driver supports the  }
  220.                                                                         {  kdcFlush Driver Configure _Control call  }
  221.         needsFlush:                BOOLEAN;                                {  Return true if driver/device has data cached  }
  222.                                                                         {  and needs to be flushed when the disk volume  }
  223.                                                                         {  is flushed by the File Manager  }
  224.         pad:                    PACKED ARRAY [0..1] OF UInt8;
  225.     END;
  226.  
  227. { Flags for purge permissions }
  228.  
  229. CONST
  230.     kbCloseOk                    = 0;                            {  Ok to call Close  }
  231.     kbRemoveOk                    = 1;                            {  Ok to call RemoveDrvr  }
  232.     kbPurgeOk                    = 2;                            {  Ok to call DisposePtr  }
  233.     kmNoCloseNoPurge            = 0;
  234.     kmOkCloseNoPurge            = $03;
  235.     kmOkCloseOkPurge            = $07;
  236.  
  237. { Driver purge permission structure }
  238.  
  239. TYPE
  240.     DriverGestaltPurgeResponsePtr = ^DriverGestaltPurgeResponse;
  241.     DriverGestaltPurgeResponse = RECORD
  242.         purgePermission:        UInt16;                                    {  0 = Do not change the state of the driver  }
  243.                                                                         {  3 = Do Close() and DrvrRemove() this driver  }
  244.                                                                         {  but don't deallocate driver code  }
  245.                                                                         {  7 = Do Close(), DrvrRemove(), and DisposePtr()  }
  246.         purgeReserved:            UInt16;
  247.         purgeDriverPointer:        Ptr;                                    {  pointer to the start of the driver block (valid  }
  248.                                                                         {  only of DisposePtr permission is given  }
  249.     END;
  250.  
  251.     DriverGestaltEjectResponsePtr = ^DriverGestaltEjectResponse;
  252.     DriverGestaltEjectResponse = RECORD
  253.         ejectFeatures:            UInt32;                                    {    }
  254.     END;
  255.  
  256. { Flags for Ejection Features field }
  257.  
  258. CONST
  259.     kRestartDontEject            = 0;                            {  Dont Want eject during Restart  }
  260.     kShutDownDontEject            = 1;                            {  Dont Want eject during Shutdown  }
  261.     kRestartDontEject_Mask        = $01;
  262.     kShutDownDontEject_Mask        = $02;
  263.  
  264. {
  265.     The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a
  266.     kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few
  267.     things about a disk drive. For example:
  268.     
  269.     • A drive that should never be in the page fault path should return kAllowVMNoneMask.
  270.       Examples of this are drives that have manual eject buttons that are not disabled by
  271.       software, drives with very slow throughput, or drives that depend on
  272.       a network connection.
  273.     • A drive that should never be written to but is safe for read-only file mapping
  274.       should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write
  275.       eats write-once space on the disk and CD-ROM drives which are read-only media.
  276.     • A drive that should allow VM to create its main backing store file should return
  277.       kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow
  278.       manual eject and don't use a network connection.
  279.     
  280.     A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  281.     what disk drive this call is for. This is a per-drive call, not a per-driver call.
  282.     
  283.     The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask,
  284.     kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit
  285.     is not valid).
  286.     
  287.     Important: All bits not defined here are reserved and should be set to zero until
  288.     they are defined for a specific purpose.
  289.     
  290.     The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's
  291.     response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if
  292.     it doesn't want to provide the ability to change the kdgVMOptions response. If a driver
  293.     supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit
  294.     that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit),
  295.     it should return paramErr.
  296. }
  297.  
  298. TYPE
  299.     DriverGestaltVMOptionsResponsePtr = ^DriverGestaltVMOptionsResponse;
  300.     DriverGestaltVMOptionsResponse = RECORD
  301.         vmOptions:                UInt32;
  302.     END;
  303.  
  304. { Bits and masks for DriverGestaltVMOptionsResponse.vmOptions field }
  305.  
  306. CONST
  307.     kAllowVMReadBit                = 0;                            {  Allow VM to use this drive for read access  }
  308.     kAllowVMWriteBit            = 1;                            {  Allow VM to use this drive for write access  }
  309.     kAllowVMNoneMask            = 0;
  310.     kAllowVMReadOnlyMask        = $01;
  311.     kAllowVMReadWriteMask        = $03;
  312.  
  313. {
  314.     The DriverGestaltMediaInfoResponse is returned by a disk driver in response to a
  315.     kdgMediaInfo DriverGestalt request. This allows a disk driver to tell callers the
  316.     physical block size, the number of blocks that are of that size, and the media type
  317.     for a given device.
  318.     
  319.     A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  320.     what disk drive this call is for. This is a per-drive call, not a per-driver call.
  321.     
  322.     On drives that support ejectable media, the response can change depending on what
  323.     media is currently in the drive.
  324. }
  325.  
  326. TYPE
  327.     DriverGestaltMediaInfoResponsePtr = ^DriverGestaltMediaInfoResponse;
  328.     DriverGestaltMediaInfoResponse = RECORD
  329.         numberBlocks:            UInt32;                                    {  number of blocks  }
  330.         blockSize:                UInt32;                                    {  physical size of blocks  }
  331.         mediaType:                SInt16;                                    {  media type identifier  }
  332.     END;
  333.  
  334. { DriverGestaltMediaInfoResponse.mediaType constants }
  335.  
  336. CONST
  337.     kMediaTypeUnknown            = 128;                            {  media type is unknown  }
  338.     kMediaTypeCDROM                = 129;                            {  media type is a CD-ROM  }
  339.     kMediaTypeDVDROM            = 130;                            {  media type is a DVD-ROM  }
  340.     kMediaTypeNoMedia            = -1;                            {  no media is present  }
  341.  
  342. {__________________________________________________________________________________}
  343. { CD-ROM Specific }
  344. { The CDDeviceCharacteristics result is returned in csParam[0] and csParam[1] of a 
  345.    standard CntrlParam parameter block called with csCode kdgGetCDDeviceInfo.
  346. }
  347.  
  348. TYPE
  349.     CDDeviceCharacteristicsPtr = ^CDDeviceCharacteristics;
  350.     CDDeviceCharacteristics = RECORD
  351.         speedMajor:                SInt8;                                    {  High byte of fixed point number containing drive speed  }
  352.         speedMinor:                SInt8;                                    {  Low byte of "" CD 300 == 2.2, CD_SC == 1.0 etc.  }
  353.         cdFeatures:                UInt16;                                    {  Flags field for features and transport type of this CD-ROM  }
  354.     END;
  355.  
  356.  
  357. CONST
  358.     cdFeatureFlagsMask            = $FFFC;                        {  The Flags are in the first 14 bits of the cdFeatures field  }
  359.     cdTransportMask                = $0003;                        {  The transport type is in the last 2 bits of the cdFeatures field  }
  360.  
  361.  
  362. { Flags for CD Features field }
  363.     cdMute                        = 0;                            {  The following flags have the same bit number  }
  364.     cdLeftToChannel                = 1;                            {  as the Audio Mode they represent.  Don't change  }
  365.     cdRightToChannel            = 2;                            {  them without changing dControl.c  }
  366.     cdLeftPlusRight                = 3;                            {  Reserve some space for new audio mixing features (4-7)  }
  367.     cdSCSI_2                    = 8;                            {  Supports SCSI2 CD Command Set  }
  368.     cdStereoVolume                = 9;                            {  Can support two different volumes (1 on each channel)  }
  369.     cdDisconnect                = 10;                            {  Drive supports disconnect/reconnect  }
  370.     cdWriteOnce                    = 11;                            {  Drive is a write/once (CD-R?) type drive  }
  371.     cdMute_Mask                    = $01;
  372.     cdLeftToChannel_Mask        = $02;
  373.     cdRightToChannel_Mask        = $04;
  374.     cdLeftPlusRight_Mask        = $08;
  375.     cdSCSI_2_Mask                = $0100;
  376.     cdStereoVolume_Mask            = $0200;
  377.     cdDisconnect_Mask            = $0400;
  378.     cdWriteOnce_Mask            = $0800;
  379.  
  380. { Transport types }
  381.     cdCaddy                        = 0;                            {  CD_SC,CD_SC_PLUS,CD-300 etc.  }
  382.     cdTray                        = 1;                            {  CD_300_PLUS etc.  }
  383.     cdLid                        = 2;                            {  Power CD - eg no eject mechanism  }
  384.  
  385. {  the following are used by PC Exchange (and Apple DOS/PC Compatibility Card) }
  386.  
  387. {  Control Codes }
  388.     kRegisterPartition            = 50;                            {  PCX needs a new Drive (for a non-macintosh partition found on the disk) }
  389.     OLD_REGISTER_PARTITION        = 301;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  390.     THE_DRIVE                    = 0;                            {  DrvQElPtr for the partition to register }
  391.     THE_PHYS_START                = 1;                            {  The start of the partition in logical blocks }
  392.     THE_PHYS_SIZE                = 2;                            {  The size of the partition in logical blocks }
  393.     kGetADrive                    = 51;                            {  control call to ask the driver to create a drive }
  394.     OLD_GET_A_DRIVE                = 302;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  395.     THE_VAR_QUEL                = 0;                            {  a VAR parameter for the returned DrvQElPtr }
  396.     kProhibitMounting            = 52;                            {  Dont allow mounting of the following drives }
  397.     kOldProhibitMounting        = 2100;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  398.     kProhibitDevice                = 0;                            {  CS Param 0 and 1 (partInfoRecPtr) }
  399.     kIsContainerMounted            = 53;
  400.     kOldIsContainerMounted        = 2201;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card             }
  401.     kContainerVRef                = 0;                            {  CS Param 0 and 1 (VRefNum) }
  402.     kContainerParID                = 1;                            {  CS Param 2 and 3 (Parent ID) }
  403.     kContainerName                = 2;                            {  CS Param 4 and 5 (File Name) }
  404.     kContainerResponse            = 3;                            {  CS Param 6 and 7 (VAR pointer to short result) }
  405.     kMountVolumeImg                = 54;
  406.     OLD_MOUNT_VOLUME_IMG        = 2000;
  407.     MV_HOST_VREFNUM                = 0;
  408.     MV_HOST_PAR_ID                = 1;
  409.     MV_HOST_NAME                = 2;
  410.     MV_REQ_PERM                    = 3;
  411.  
  412. {  Status Codes }
  413.  
  414.     kGetPartitionStatus            = 50;                            {  what is the status of this partition? }
  415.     kOldGetPartitionStatus        = 2200;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  416.     kDeviceToQuery                = 0;                            {  CS Param 0 and 1 (partInfoRecPtr) }
  417.     kDeviceResponse                = 1;                            {  CS Param 2 and 3 (VAR pointer to short result) }
  418.     kGetPartInfo                = 51;                            {  Get a partition info record based on the provided vrefnum }
  419.     kOldGetPartInfo                = 2300;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  420.     kPartInfoResponse            = 0;                            {  var parameter (pointer to partInfoRec) CSParam [0-1] }
  421.     kGetContainerAlias            = 52;                            {  Get the alias that describes the file this drive was mounted from. }
  422.     kOldGetContainerAlias        = 2400;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  423.     kGetAliasResponse            = 0;                            {     var parameter (pointer to a Handle) CSParam [0-1] }
  424.  
  425. {  the result codes to come from the driver interface  }
  426.  
  427.     DRIVER_NOT_INSTALLED        = -1;
  428.     DRIVER_BUSY                    = -2;
  429.     CANT_MOUNT_WITHIN_THIS_FS    = -3;                            {  can only mount container within residing on HFS volume }
  430.     VOLUME_ALREADY_MOUNTED        = -4;                            {  Already Mounted }
  431.  
  432. {  requisite structures for PCX control and status calls }
  433.  
  434.     kMaxProhibted                = 2;                            {  the max number of volumes the PC can possibly have mounted }
  435.  
  436. {  GestaltSelector for Finding Driver information }
  437.  
  438.     kGetDriverInfo                = 'vdrc';
  439.  
  440.     VerifyCmd                    = 5;
  441.     FormatCmd                    = 6;
  442.     EjectCmd                    = 7;
  443.  
  444. {  Partition information passed back and forth between PCX and the driver }
  445.  
  446. TYPE
  447.     partInfoRecPtr = ^partInfoRec;
  448.     partInfoRec = RECORD
  449.         SCSIID:                    DeviceIdent;                            {  DeviceIdent for the device }
  450.         physPartitionLoc:        UInt32;                                    {  physical block number of beginning of partition }
  451.         partitionNumber:        UInt32;                                    {  the partition number of this partition }
  452.     END;
  453.  
  454.     vPartInfoRecPtr = ^vPartInfoRec;
  455.     vPartInfoRec = RECORD
  456.         VPRTVers:                SInt8;                                    {  Virtual partition version number }
  457.         VPRTType:                SInt8;                                    {  virtual partition type (DOS, HFS, etc) }
  458.         drvrRefNum:                SInt16;                                    {  Driver Reference number of partition driver }
  459.     END;
  460.  
  461. {  Information related to DOS partitions }
  462.  
  463. CONST
  464.     kDOSSigLow                    = $01FE;                        {  offset into boot block for DOS signature }
  465.     kDOSSigHi                    = $01FF;                        {  offset into boot block for DOS signature }
  466.     kDOSSigValLo                = $55;                            {  DOS signature value in low byte }
  467.     kDOSSigValHi                = $AA;                            {  DOS signature value in high byte }
  468.  
  469.  
  470.  
  471. {$ALIGN RESET}
  472. {$POP}
  473.  
  474. {$SETC UsingIncludes := DriverGestaltIncludes}
  475.  
  476. {$ENDC} {__DRIVERGESTALT__}
  477.  
  478. {$IFC NOT UsingIncludes}
  479.  END.
  480. {$ENDC}
  481.